<template>
    <div class="pageheader">
        <el-page-header @back="$router.back()">
            <template #content>
                <span> 报告生成 </span>
            </template>
        </el-page-header>
    </div>
</template>
<script lang="ts" setup>
import router from '@/router';
import { ElMessage } from 'element-plus';
import { id } from 'element-plus/es/locale';

const solution = window.sessionStorage.getItem("best")
const downloadReport = (id: string) => {
    window.open(`http://localhost:8004/indicator/report/${id}`);
    router.back();
}
if (solution === null) {
    ElMessage.error("尚未选择方案！")
} else {
    downloadReport(solution);
}
</script>